﻿<Window x:Class="BasketGame.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:BasketGame" WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize"
        Title="MainWindow" Height="1080" Width="1920" DataContext="{Binding ViewModel, Source={StaticResource loader}}" KeyDown="Window_KeyDown">
    <Grid>
        <Image x:Name="Background" Width="1920" Height="1080" Stretch="Fill"/>
        <local:BalloonControl HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-50 -50 0 0" Visibility="{Binding FruitTheme}"/>
        <Image x:Name="Penguin" Width="100" Height="100" HorizontalAlignment="Right" 
               Source="pack://application:,,,/Images/penguin.png" Margin="0 350 100 0" Visibility="{Binding VegetableTheme}"/>
        <TextBlock Text="{Binding Emotion}" FontSize="32" VerticalAlignment="Bottom" Margin="100 0 0 0" Visibility="{Binding ShowDebugging}"/>
        <TextBlock Text="{Binding Score}" FontSize="32" VerticalAlignment="Bottom" Visibility="{Binding ShowDebugging}"/>
        <TextBlock Text="{Binding CurrentLevel}" FontSize="32" VerticalAlignment="Bottom" Margin="50 0 0 0" Visibility="{Binding ShowDebugging}"/>
        <TextBlock Text="{Binding EmotionLetter}" FontSize="20" VerticalAlignment="Bottom"/>
        <!--<local:ProgressBasketControl HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 250 20 0"/>-->
        <local:ProgressFlagControl VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
        <local:GameContainerControl Width="1300" HorizontalAlignment="Center"/>
        <MediaElement Volume="0.01" x:Name="BackgroundMusic" LoadedBehavior="Manual"/>
        <local:EndGameSplashControl x:Name="EndGame" Visibility="Hidden"/>
        <Grid.Triggers>
            <EventTrigger RoutedEvent="Grid.Loaded">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <MediaTimeline Source="Music/gameMusic.mp3" Storyboard.TargetName="BackgroundMusic" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </Grid.Triggers>
        
    </Grid>
</Window>
